Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Laziness for Markers #89

Merged
merged 4 commits into from
Oct 24, 2023
Merged

Remove Laziness for Markers #89

merged 4 commits into from
Oct 24, 2023

Conversation

JustusAdam
Copy link
Collaborator

@JustusAdam JustusAdam commented Oct 22, 2023

What Changed?

Eagerly visit all IDs in the program under analysis and register potential markers.
Rips out all the infrastructure that was used to do it lazily.

Refactors the CollectingVisitor into two structs, the visitor and then an SPDGGenerator that runs the actual analysis. This separates the concerns out better. The former stores (among other things) a mutable MarkerDatabase that it fills with the markers for local functions and types and it collects a vector of analysis targets.
Once the visit is done it is converted into the SPDGGenerator which stores the read-only MarkerCtx.

Why Does It Need To?

Lazy markers were confusing. Markers on controllers were never registered. Also could cause surprising vacuity if markers were never encountered because e.g. their call sites happened in a closure.

Checklist

  • Above description has been filled out so that upon quash merge we have a
    good record of what changed.
  • New functions, methods, types are documented. Old documentation is updated
    if necessary
  • Documentation in Notion has been updated
    • Remove from list of arguments
    • Remove from step-by-step guide
  • Tests for new behaviors are provided
    • New test suites (if any) ave been added to the CI tests (in
      .github/workflows/rust.yml) either as compiler test or integration test.
      Or justification for their omission from CI has been provided in this PR
      description.

@JustusAdam JustusAdam changed the title No more lazy markers Remove Laziness for Markers Oct 24, 2023
@JustusAdam JustusAdam merged commit d56ebad into main Oct 24, 2023
5 checks passed
@JustusAdam JustusAdam deleted the eager-markers-by-default branch October 28, 2023 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants